{template 'common/header'}

<div class="main">
    {template 'nav'}

    <div class="panel panel-info">
	<div class="panel-heading">筛选</div>
	<div class="panel-body">
		<form action="./index.php" method="get" class="form-horizontal" role="form">
			<input type="hidden" name="c" value="site" />
			<input type="hidden" name="a" value="entry" />
        	<input type="hidden" name="m" value="redpacksend_rp" />
        	<input type="hidden" name="do" value="manage" />
			<div class="form-group">
				<label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">关键字</label>
				<div class="col-sm-8 col-lg-9">
					<input class="form-control" name="keywords" id="" type="text" value="{$_GPC['keywords']}">
				</div>
                                <div class=" col-xs-12 col-sm-2 col-lg-2">
					<button class="btn btn-default"><i class="fa fa-search"></i> 搜索</button>
				</div>
			</div>
 			<div class="form-group">
			</div>
		</form>
	</div>
 
    </div>
 
    <div style="padding:15px;">
        <table class="table table-hover">
            <thead class="navbar-inner">
                <tr>
                    <th style="width:100px;">序号</th>
                    <th style="width:100px;">活动名称</th>
                    <th style="width:100px;">提供者</th>
                    <th style="width:150px;">备注</th>
                    <th >总金额/笔数</th>
                    <th >添加时间</th>
                    <th style="width:100px;">详情</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                {loop $list $row}
                <tr>
                    <td>{$row['id']} </td>
                    <td>{$row['activityName']} </td>
                    <td>{$row['provider']}</td>
                    <td>{$row['remark']}</td>
                    <td>{$row['totalMoney']}/{$row['num']}</td>
                    <td>{php echo date('Y-m-d H:i:s',$row['addTime'])}</td>
                    <td><a href="{php echo $this->createWebUrl('prizeList',array('rid'=>$row['id']))}">查看</a></td>
                    <td >
                        <!--<a class="btn btn-default" rel="tooltip" href="{php echo url('platform/reply/post',array('m'=>'ewei_couplet','rid'=>$row['id']));}" title="编辑"><i class="fa fa-edit"></i></a>-->
                        {if $row['status']==0}
                        <a class="btn   btn-default" title="开始活动" href="#" onclick="drop_confirm('您确定要开始吗?', '{php echo $this->createWebUrl('setshow',array('rid'=>$row['id'],'isshow'=>1))}');"><i class="fa fa-play"></i></a>
                        {elseif $row['status']==1}
                        <a class="btn   btn-default" title="结束活动" href="#" onclick="drop_confirm('您确定要暂停吗?', '{php echo $this->createWebUrl('setshow',array('rid'=>$row['id'],'isshow'=>0))}');"><i class="fa fa-stop"></i></a>
                        {/if}
                        <a class="btn  btn-default" rel="tooltip" href="#" onclick="drop_confirm('您确定要删除吗?', '{php echo $this->createWebUrl('delete',array('rid'=>$row['id']))}');" title="删除"><i class="fa fa-times"></i></a>
                    </td>
                </tr>
                {/loop}

            </tbody>
        </table>
        {$pager}
    </div>

</div>

<script>
            function drop_confirm(msg, url){
            if (confirm(msg)){
            window.location = url;
            }
            }
</script>

{template 'common/footer'}